<div class="check">

    <form class="form-horizontal" action="<?= lang_url('confirmation') ?>" method="get" id="doreservation">

        <?
        $ST_ID = $reservation->room->selling_type_ID;
        $R_STATUS = $ST_ID == 1 ? WAITNG_AVAILABILITY : WAITNG_PAYMENT;
        $R_30_PERCENT = find_percent(30, $reservation->reservation->price_total);
        ?>

        <input class="hidden" type="text" name="hotel_id" id="hotel_id" value="<?= $_GET['hotel_id'] ?>">
        <input class="hidden" type="text" name="room_id" value="<?= $_GET['room_id'] ?>">
        <input class="hidden" type="text" name="selling_type_ID" value="<?= $ST_ID ?>">
        <input class="hidden" type="text" name="check_in" value="<?= $_GET['check_in'] ?>">
        <input class="hidden" type="text" name="check_out" value="<?= $_GET['check_out'] ?>">
        <input class="hidden" type="text" name="nr_adults" value="<?= $_GET['nr_adults'] ?>">
        <input class="hidden" type="text" name="nr_childrens" value="<?= $_GET['nr_childrens'] ?>">
        <input class="hidden" type="text" name="nr_babies" value="<?= $_GET['nr_babies'] ?>">
        <input class="hidden" type="text" name="reservation_status" value="<?= $R_STATUS ?>">

        <div id="payment_insurance">

            <div class="payment">
                <?php
                    $this->load->view('parts/total', array(
                        'service_total' => $reservation->reservation->service_total,
                        'total' => $reservation->reservation->price_total,
                        'tax' => isset($reservation->tax) ? $reservation->tax : NULL,
                        'service_name' => $reservation->room->service_name,
                        'R_30_PERCENT' => $R_30_PERCENT
                    ))
                ?>
            </div>

        </div>

        <div class="sec">

            <div id="summary" class="secp clearfix">

                <img src="<?= HOST_URL_HOTELS . $reservation->photo_path . '/thumb_182x123/' . $reservation->photo_name; ?>">


                <ul>
                    <li class="section"><h4><?= $reservation->object_name ?></h4></li>
                    <li><?= lang('c.location'); ?>: <span><?= $reservation->destination_name ?></span></li>
                    <li><?= lang('c.type_accomm'); ?>: <span><?= lang('type.' . $reservation->object_type_type) ?></span></li>
                    <li><?= lang('dtl.num_of_persons'); ?>: <span><?= lang('dtl.adults'); ?>: <?= $_GET['nr_adults'] ?>, <?= lang('dtl.teenagers'); ?>: <?= $_GET['nr_teenagers'] ?>, <?= lang('dtl.children'); ?>: <?= $_GET['nr_childrens'] ?>, <?= lang('dtl.babies'); ?>
                            : <?= $_GET['nr_babies'] ?></span></li>
                    <li><?= lang('dtl.period'); ?>: <span><?= $_GET['check_in'] ?> - <?= $_GET['check_out'] ?></span></li>
                    <li class="change"><a
                            href="<?= lang_url('changedates?') . http_build_query($_GET) ?>"><?= lang('c.change_settings'); ?></a>
                    </li>

                </ul>

            </div>
            <!-- /summary-->

            <?php if ($reservation->room->selling_type_ID == 1): ?>
                    <div class="secp">
                        <p>
                            <?= lang('c.inquery_info'); ?>
                        </p>
                    </div>
                <?php endif; ?>

            <div id="passenger" class="secp clearfix">

                <h4><?= lang('c.info_reservation_holder'); ?></h4>

                <div class="half pull-left">
                    <div class="inner_prices">

                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('gender'); ?>:*</label>

                            <div class="controls">
                                <select placeholder="<?= lang('gender'); ?>" name="sex" id="sex" required>
                                    <option value=""><?= lang('gender'); ?></option>
                                    <option value="M"><?= lang('male'); ?></option>
                                    <option value="Z"><?= lang('female'); ?></option>
                                </select>
                            </div>

                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('name'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('name'); ?>" name="name" id="name" required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('date_of_birth'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('date_of_birth'); ?>" name="birth_date" id="birth_date"
                                       required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label label_checkout_<?= $this->lang->mci_current() ?>"
                                   for="service"><?= lang('mobile_phone'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('mobile_phone'); ?>" name="phone" id="phone" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('city'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('city'); ?>" name="city" id="city" required value="">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="half pull-left">
                    <div class="inner_prices">
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('email'); ?>:*</label>

                            <div class="controls">
                                <input type="email" placeholder="<?= lang('email'); ?>" name="email" id="email" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('surname'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('surname'); ?>" name="surname" id="surname" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('address'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('address'); ?>" name="address" id="address" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('zip_code'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('zip_code'); ?>" name="zip" id="zip" required value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('country'); ?>:*</label>

                            <div class="controls">
                                <select placeholder="<?= lang('country'); ?>" name="country" id="country" required>
                                    <option value=""><?= lang('country'); ?></option>
                                    <?php
                                        foreach (config_item('country_list') as $key => $country)
                                            echo "<option value='{$country}'>{$country}</option>";
                                    ?>
                                </select>
                            </div>
                        </div>
                    </div>

                </div>

                <div style="clear:both"></div>

                <div class="inner_prices">

                    <div class="control-group last">
                        <label class="control-label" for="service"><?= lang('note') ?>:</label>

                        <div class="controls">
                            <textarea name="notice" id="notice"></textarea>
                        </div>
                    </div>
                </div>

            </div>
            <!-- /passenger-->

            <div id="payment_method" class="secp clearfix">

                <div class="half pull-left">

                    <h4><?= lang('c.methods_of_payment'); ?></h4>

                    <div class="inner_prices">
                        <?php
                            $pm = $reservation->payment_method;
                            $po = $reservation->payment_option;
                        ?>
                        <ul>
                            <?php
                                if (in_array(1, $pm)):
                                    ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_method" value="Credit card online"><?= lang('c.cc_online'); ?>
                                    </li>

                                <?php endif; ?>

                            <?php if (in_array(2, $pm)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_method" value="Credit card using offline authorization"><?= lang('c.cc_offline'); ?>
                                    </li>
                                <?php endif; ?>

                            <?php if (in_array(3, $pm)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_method" value="Bank transfer in EUR"><?= lang('c.bank_trasfer'); ?>
                                    </li>
                                <?php endif; ?>

                            <?php if (in_array(4, $pm)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_method" value="Western Union"><?= lang('c.wu'); ?>
                                    </li>
                                <?php endif; ?>

                            <?php if (in_array(5, $pm)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_method" value="Cache"><?= lang('c.cache'); ?>
                                    </li>
                                <?php endif; ?>

                        </ul>
                    </div>
                </div>

                <div class="half pull-left">

                    <h4><?= lang('foot.payment'); ?></h4>

                    <div class="inner_prices" style="padding-right: 0">

                        <ul>
                            <?php
                                $docheck = 'checked="checked"';

                                if (in_array(3, $po)):
                                    ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_options" value="Payment in full" <?=
                                        $docheck;
                                        $docheck = "";
                                        ?>><?= lang('c.payment_in_full'); ?>
                                    </li>

                                <?php endif; ?>

                            <?php if (in_array(2, $po)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_options" value="30% now and 70% balance 10 days before arrival" <?=
                                        $docheck;
                                        $docheck = "";
                                        ?>><?= lang('c.30_70_10'); ?>
                                    </li>

                                <?php endif; ?>


                            <?php if (in_array(1, $po)): ?>

                                    <li class="clearfix">
                                        <input type="radio" name="payment_options" value="30% now and 70% balance upon arrival" <?=
                                        $docheck;
                                        $docheck = "";
                                        ?>><?= lang('c.30_70'); ?>
                                    </li>

                                <?php endif; ?>


                        </ul>
                    </div>
                </div>

            </div>
            <!-- /payment_method-->

            <div id="terms" class="secp clearfix">

                <input type="checkbox" id="agree" name="agree" checked="checked">
                <?= lang('c.i_have_read'); ?>
                <a href="<?= lang_url('cipatravel/termss-37') ?>"><?= lang('c.general_terms'); ?>
                    <? if ($this->lang->mci_current() != 'me') echo '&'; ?>
                    <?= lang('c.conditions'); ?></a>
                <span class="emp">*</span>

            </div>
            <!-- /terms-->

        </div>

        <div class="hold_booknow">
            <input type="submit" class="booknow  <?= $reservation->room->selling_type_ID == 1 ? "request" : ""; ?>"
                   value="<?= $reservation->room->selling_type_ID == 1 ? lang('make_request') : lang('make_reservation'); ?>">
        </div>
        <!-- /booknow-->

    </form>

</div>